<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <include file="Public:meta"/>
    <link rel="stylesheet" type="text/css" href="__TMPL__Public/plugins/bootstrap-fileupload/bootstrap-fileupload.css"/>
    <link rel="stylesheet" type="text/css" href="__TMPL__Public/css/order_info.css"/>
</head>
<style type="text/css">
    body img{
        display:inline-block;
        height:50px;
        width:50px;
    }  
</style>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<include file="Public:header"/>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <include file="Public:sidebar"/>
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <div class="container-fluid">
            <div class="row-fluid">
                <!-- begin BCN -->
                <div class="row-fluid">
                    <div class="span12"><ul class="breadcrumb"><li><a onfocus="blurLink(this);" href="{:U(CONTROLLER_NAME.'/index')}">{$ParentPageName|default="未命名"}</a>&nbsp;<span class="icon-angle-right"></span>&nbsp;</li><li>{$PageName|default="未命名"}</li></ul></div>
                </div>
                <!-- end BCN -->
            </div>
            <div class="row-fluid white">
                <div class="span12 container">
                    <div class="info order">
                        <div class="item">
                            <div>
                                订单信息
                            </div>
                            <div class="status">
                                <eq name="order_info.type" value="1">
                                    <switch name="order_info.status">
                                        <case value="1">待付款</case>
                                        <case value="2">待确认</case>
                                        <case value="3">待评价</case>
                                        <case value="4">已完成</case>
                                        <case value="5">已失效</case>
                                        <case value="6">已取消</case>
                                        <case value="7">退款申请中</case>
                                        <case value="8">已拒绝</case>
                                        <case value="9">退款中</case>
                                        <case value="10">退款完成</case>
                                    </switch>
                                <else/>
                                    <switch name="order_info.status">
                                        <case value="1">待付款</case>
                                        <case value="2">已付款</case>
                                        <case value="3">已完成</case>
                                    </switch>
                                </eq>
                            </div>
                        </div>
                        <div class="item">
                            <div>
                                <span>订单编号：{$order_info['order_num']}</span>
                                <span>下单时间：{$order_info['crdate']|date="Y-m-d H:i:s",###}</span>
                            </div>
                            <div>
                                <span>入住人：{$order_info['name']}</span>
                                <span>联系电话：{$order_info['phone']}</span>
                            </div>
                        </div>
                    </div>
                    <div class="info user">
                        <div class="item">
                            <div>
                                客户信息
                            </div>
                        </div>
                        <div class="item">
                            <img src="{$user_info.wxlogo}" /> 
                            <span>{$user_info.nickname}</span>
                        </div>
                        <div class="item">
                            <div>
                                <span>联系电话：{$user_info.mobile}</span>
                            </div>
                            <div>
                                <span>备注：{$order_info.message}</span>
                            </div>
                        </div>
                    </div>
                    <div class='order'>
                        <div class="table">
                            <eq name="order_info.type" value="1">
                                <table class="table table-striped table-hover table-bordered">
                                    <thead>
                                        <tr>
                                            <th>酒店信息</th>
                                            <th>数量</th>
                                            <th>天数</th>
                                            <th>优惠抵扣</th>
                                            <th>合计</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><img src="{$order_info.image}" />{$order_info.room_name}</td>
                                            <td>*{$order_info.num}</td>
                                            <td>*{$order_info.day}</td>
                                            <td>{$order_info.coupon_money}</td>
                                            <td>{$order_info.pay_price}</td>
                                            <td>
                                                <a class="btn green-stripe mini achieve" href="javascript:void(0)" data-id="{$order_info['info_id']}" data-url="{:U(CONTROLLER_NAME.'/achieve')}">房价明细</a>
                                                <eq name="order_info.status" value="2">
                                                    <a class="btn green-stripe mini" href="{:U(CONTROLLER_NAME.'/complete',array('id' => $order_info['id']))}">信息补录</a>
                                                </eq>
                                                <in name="order_info.status" value="3,4">
                                                    <a class="btn green-stripe mini achieve" href="javascript:void(0)" data-id="{$order_info['id']}" data-url="{:U(CONTROLLER_NAME.'/checkAchieve')}">入住详细</a>
                                                </in>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            <else/>
                                <table class="table table-striped table-hover table-bordered">
                                    <thead>
                                        <tr>
                                            <th>商品信息</th>
                                            <th>价格</th>
                                            <th>数量</th>
                                            <th>小计</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="order_info['info']" id="vo" key="k">
                                            <tr>
                                                <td>
                                                    <img src="{$vo.image}" />{$vo.name}
                                                </td>
                                                <td>
                                                    {$vo.price}
                                                </td>
                                                <td>
                                                    {$vo.num}
                                                </td>
                                                <td>{$vo['price'] * $vo['num']}</td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            </eq>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- END PAGE -->
</div>
<!-- END CONTAINER -->

<include file="Public:footer"/>
<script type="text/javascript" src="__TMPL__Public/plugins/bootstrap-fileupload/bootstrap-fileupload.js"></script>
<script type="text/javascript">
    $(function(){
        /*查看详情*/
        $('.achieve').click(function(){
            var id = $(this).attr('data-id');
            var url = $(this).attr('data-url');
            
            $('body').modalmanager('loading');
            
            $.get(url, {id: id}, function(data){
                $('#ajax-modal').html(data).modal();
            });
            return false;
        });
    });
</script>
</body>
<!-- END BODY -->
